{if condition="Request()->Action() eq 'edit'"}
{Data:article id="request" var="vo"}
{else /}
<?php
	$vo=[
		'date'	=>	date('Y-m-d'),
	];
?>
{/if}
<form action="__APP__/{$Request.controller}/update.html" class="child-form page-list-form layui-form layui-form-pane" method="post">
	<div class="layui-form-item">
		<label class="layui-form-label">买入日期</label>
		<div class="layui-input-inline input-6x">
			{Html:input name="date" data-type="date" value="$vo['date']" placeholder="请选择买入日期" /}
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">买入金额</label>
		<div class="layui-input-inline input-6x">
			{Html:input name="inprice" value="$vo.inprice|default=0" placeholder="请填写买入金额" /}
			<span class="dw">元</span>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">描述</label>
		<div class="layui-input-inline input-6x">
			<input type="text" class="layui-input" name="des" value="{$vo.des}" autocomplete="off" placeholder="请填写车辆描述" />
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">其他费用</label>
		<div class="layui-input-inline input-6x">
			<input type="text" class="layui-input" name="other" value="{$vo.other|default=0}" autocomplete="off" placeholder="请填写金额"/>
			<span class="dw">元</span>
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">卖出日期</label>
		<div class="layui-input-inline input-6x">
			<input type="text" class="layui-input date" name="out_date" value="{$vo.out_date}" autocomplete="off" placeholder="请选择卖出日期" />
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">卖出金额</label>
		<div class="layui-input-inline input-6x">
			<input type="text" class="layui-input" name="outprice" value="{$vo.outprice|default=0}" autocomplete="off" placeholder="请填写金额"/>
			<span class="dw">元</span>
		</div>
	</div>
	<div class="layui-form-item">
		<div class="layui-input-inline input-6x">
			<button type="submit" class="layui-btn" lay-submit="" lay-filter="formSubmit">提交</button>
		</div>
	</div>
	<input type="hidden" name="id" value="{$vo.id}" />
</form>
<script>
layui.use('laydate', function(){
    var laydate = layui.laydate;    
    //执行一个laydate实例
    laydate.render({
        elem: '.date' //指定元素
    });
});
</script>